package com.maimang.platform.common.utils;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

/**
 * @classname MapUtil
 * @description <br>Map通用工具类</br>
 * @author  Rocky
 * @date    2019-10-14 23:06
 * @email   jintaozhao@qq.com
 * @version 1.0.0
 */
public class MapUtil {

	public static void mapCopy(Map sourceMap, Map resultMap) {
		if (resultMap == null)
			resultMap = new HashMap();
		if (sourceMap == null)
			return;
		Iterator it = sourceMap.entrySet().iterator();
		while (it.hasNext()) {
			Map.Entry entry = (Map.Entry) it.next();
			Object key = entry.getKey();
			resultMap.put(key, sourceMap.get(key) != null ? sourceMap.get(key) : "");
		}
	}
    
}
